package cn.jhc.teachingquality.bean;

import java.io.Serializable;

import cn.jhc.teachingquality.util.CountLessonsUtils;

/**
 * Created by luyanfei on 16-3-18.
 */
public class TeachingLog implements Serializable{

    private String hiddenId;
    //课程名
    private String courseName;
    //周次
    private int weekSeq;
    //上课时间
    private String periodDesc;
    //班级名
    private String className;

    public TeachingLog(String hiddenId, String courseName, int weekSeq, String periodDesc, String className) {
        this.hiddenId = hiddenId;
        this.courseName = courseName;
        this.weekSeq = weekSeq;
        this.periodDesc = periodDesc;
        this.className = className;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public String getCourseName() {
        return courseName;
    }

    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }

    public int getWeekSeq() {
        return weekSeq;
    }

    public void setWeekSeq(int weekSeq) {
        this.weekSeq = weekSeq;
    }

    public String getPeriodDesc() {
        return periodDesc;
    }

    public void setPeriodDesc(String periodDesc) {
        this.periodDesc = periodDesc;
    }

    public String getHiddenId() {
        return hiddenId;
    }

    public void setHiddenId(String hiddenId) {
        this.hiddenId = hiddenId;
    }

    public String getMainTitle(){
        return getCourseName() + "(" + getClassName() + ")";
    }

    public String getSubTitle(){
        return "第" + getWeekSeq() + "周 星期" + getPeriodDesc();
    }

    /**
     * 根据上课时间字符串，算出上课的节数。
     * @return
     */
    public int getLessonCount(){
        return CountLessonsUtils.countLessonsFromString(periodDesc);
    }
}
